<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page isELIgnored="false" %> 

<%String path = request.getContextPath();%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	
    <link href="<%=path %>/css/index.css" type="text/css" rel="stylesheet" />
    <link href="<%=path %>/css/base.css" type="text/css" rel="stylesheet" />
    
    <style type="text/css">
		.c1-bline{border-bottom:#999 1px dashed;border-top:1px;}
		.f-right{float:right}
		.f-left{float:left}
		.clear{clear:both}
		
		/* 图片轮播 */
		.d1{height:auto;overflow:hidden;solid;background-color:#000000;position:relative;}
		.loading{border:0px solid;font-size:12px;text-align:center;
		        padding-top:30px;font-family:Verdana, Arial, Helvetica, sans-serif;font-weight:bold;}
		.d2{width:100%;overflow:hidden;}
		.num_list{position:absolute;width:100%;left:0px;bottom:-1px;background-color:#000000;color:#FFFFFF;
		         font-size:12px;padding:4px 0px;height:20px;overflow:hidden;}
		.num_list span{display:inline-block;height:16px;padding-left:6px;}
		img{border:0px;}
		
		.button{position:absolute; z-index:1000; right:0px; bottom:2px; font-size:13px; font-weight:bold; 
		font-family:Arial, Helvetica, sans-serif;}
		.b1,.b2{background-color:#666666;display:block;float:left;padding:2px 6px;margin-right:3px;
		color:#FFFFFF;text-decoration:none;cursor:pointer;}
		.b2{color:#FFCC33;background-color:#FF6633;}
		/* 图片轮播 */
	</style>

    <script type="text/javascript">
        /* 图片轮播 */
		//主函数
		var s=function(){
		var interv=2000; //切换间隔时间
		var interv2=10; //切换速速
		var opac1=80; //文字背景的透明度
		var source="fade_focus" //焦点轮换图片容器的id名称
		//获取对象
		function getTag(tag,obj){if(obj==null){return document.getElementsByTagName(tag)}else{return obj.getElementsByTagName(tag)}}
		function getid(id){return document.getElementById(id)};
		var opac=0,j=0,t=63,num,scton=0,timer,timer2,timer3;var id=getid(source);id.removeChild(getTag("div",id)[0]);var li=getTag("li",id);var div=document.createElement("div");var title=document.createElement("div");var span=document.createElement("span");var button=document.createElement("div");button.className="button";for(var i=0;i<li.length;i++){var a=document.createElement("a");a.innerHTML=i+1;a.onclick=function(){clearTimeout(timer);clearTimeout(timer2);clearTimeout(timer3);j=parseInt(this.innerHTML)-1;scton=0;t=63;opac=0;fadeon();};a.className="b1";a.onmouseover=function(){this.className="b2"};a.onmouseout=function(){this.className="b1";sc(j)};button.appendChild(a);}
		//控制图层透明度
		function alpha(obj,n){if(document.all){obj.style.filter="alpha(opacity="+n+")";}else{obj.style.opacity=(n/100);}}
		//控制焦点按钮
		function sc(n){for(var i=0;i<li.length;i++){button.childNodes[i].className="b1"};button.childNodes[n].className="b2";}
		title.className="num_list";title.appendChild(span);alpha(title,opac1);id.className="d1";div.className="d2";id.appendChild(div);id.appendChild(title);id.appendChild(button);
		//渐显
		var fadeon=function(){opac+=5;div.innerHTML=li[j].innerHTML;span.innerHTML=getTag("img",li[j])[0].alt;alpha(div,opac);if(scton==0){sc(j);num=-2;scrolltxt();scton=1};if(opac<100){timer=setTimeout(fadeon,interv2)}else{timer2=setTimeout(fadeout,interv);};}
		//渐隐
		var fadeout=function(){opac-=5;div.innerHTML=li[j].innerHTML;alpha(div,opac);if(scton==0){num=2;scrolltxt();scton=1};if(opac>0){timer=setTimeout(fadeout,interv2)}else{if(j<li.length-1){j++}else{j=0};fadeon()};}
		//滚动文字
		var scrolltxt=function(){t+=num;span.style.marginTop=t+"px";if(num<0 && t>3){timer3=setTimeout(scrolltxt,interv2)}else if(num>0 && t<62){timer3=setTimeout(scrolltxt,interv2)}else{scton=0}};
		fadeon();
		}
		//初始化
		window.onload=s;
		/* 图片轮播 */
		
		
	</script>
</head>
  
<body>
	<div class="banner">
        <jsp:include flush="true" page="/qiantai/top.jsp"></jsp:include>
	</div>
    <div class="customer" style="height: 230px;margin-top: 10px;">
    	<div class="news" style="border:solid 1px #dcdcdc;height: 240px;">
            <span style="margin-left: 5px;color: red;font-size: 11px;margin-bottom: -20px;">新闻资讯</span>
            <ul>
            	<c:forEach items="${sessionScope.xinwenList}" var="xinwen">
            	<li><a href="<%=path %>/xinwenDetailQian.action?id=${xinwen.id}"><c:out value="${fn:substring(xinwen.biaoti, 0, 28)}" escapeXml="false"></c:out></a></li>
            	</c:forEach>       
            </ul>
            
        </div>
        <div class="product" style="border:solid 1px #dcdcdc;height: 240px;">
        	<div id="fade_focus">
			     <div class="loading"></div>
				 <ul style="display: none">
				      <li><a href="#"><img src="<%=path %>/img/10.jpg" width="380" height="235"/></a></li>
				      <li><a href="#"><img src="<%=path %>/img/11.jpg" width="380" height="235"/></a></li>
				      <li><a href="#"><img src="<%=path %>/img/12.jpg" width="380" height="235"/></a></li> 
				      <%-- <c:forEach items="${sessionScope.xinwenList }" var="xinwen" varStatus="ss">
				      <li><a href="<%=path %>/xinwenDetailQian.action?id=${xinwen.id}"><img src="<%=path %>/${xinwen.fujian}" width="380" height="242" alt="${xinwen.biaoti}" /></a></li>
				      </c:forEach> --%>
			     </ul>   
            </div>
        </div>
        
        
        <div class="consult" style="border:solid 1px #dcdcdc;height: 240px;">
        	<span>HOTLINE</span><big>400-821-6188</big>
            <div class="web">
            	<div class="qq">
                	<a href="#"><img src="<%=path %>/images/01.png"/></a>
                    <a href="#"><img src="<%=path %>/images/02.png"/></a>
                    <a href="#"><img src="<%=path %>/images/03.png"/></a>
                    <a href="#"><img src="<%=path %>/images/04.png"/></a>
                    <a href="#"><img src="<%=path %>/images/05.png"/></a>
                    <span>
                       <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq&menu=yes">
				         <img border="0" src="http://wpa.qq.com/pa?p=2:123456:41" alt="点击这里给我发消息" title="点击这里给我发消息">
				       </a>
				       <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq&menu=yes">
				         <img border="0" src="http://wpa.qq.com/pa?p=2:123456:41" alt="点击这里给我发消息" title="点击这里给我发消息">
				       </a>
                    </span>
                </div>
                <a href="#" class="two"><img src="<%=path %>/images/07.png"/></a>
            </div>
            <b></b>
        </div>
    </div>

    <div class="main01" style="margin-top: 25px;">
    	<h2>
            <span style="font-size: 18px;font-weight:900 ">最新上架</span>
            <!-- <div class="right" style="font-size: 14px;">dd</div> -->
        </h2>
        <div class="goods">
        	<TABLE cellpadding="6" cellspacing="5">
			            <TR>
			                  <c:forEach items="${requestScope.goodsNoTejiaList}" var="goods" varStatus="sta">
			                    <c:if test="${sta.index%5==0}">
			                       </tr><tr>
			                    </c:if>
				                <TD>
				                  <TABLE onmouseover="this.style.backgroundColor='#FF6600'" onmouseout="this.style.backgroundColor=''" b>
				                    <TR>
				                      <TD align=left valign="top">
		                                   <center>
				                              <A href="<%=path %>/goodsDetailQian.action?goodsId=${goods.goodsId}">
				                              <IMG border=0 src="<%=path %>/${goods.goodsPic}" width=195 height=220></A>
				                           </center>
				                           <center>
				                              <A href="<%=path %>/goodsDetailQian.action?goodsId=${goods.goodsId}">
				                              <FONT color=#ff0000>${goods.goodsName}&nbsp;&nbsp;</FONT></A>
				                           <center>
				                      </TD>
				                    </TR>
				                  </TABLE>
				                </TD>
			                </c:forEach>
			              </TR>  
				    </TABLE>
        </div>
    </div>
    
    
    <br/>
    <div class="bottom">
        <jsp:include flush="true" page="/qiantai/down.jsp"></jsp:include>
    </div>
</body>
</html>
